// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   register_ok.java

package crm.accomplish;

import include.nseer_db.nseer_db_backup1;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import javax.servlet.jsp.JspFactory;

public class register_ok extends HttpServlet
{

	ServletContext application;
	HttpSession session;
	nseer_db_backup1 erp_db;

	public register_ok()
	{
		erp_db = null;
	}

	public synchronized void doPost(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException
	{
		HttpSession dbSession = request.getSession();
		JspFactory _jspxFactory = JspFactory.getDefaultFactory();
		javax.servlet.jsp.PageContext pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
		ServletContext dbApplication = dbSession.getServletContext();
		try
		{
			PrintWriter out = response.getWriter();
			HttpSession session = request.getSession();
			nseer_db_backup1 crm_db = new nseer_db_backup1(dbApplication);
			if (crm_db.conn((String)dbSession.getAttribute("unit_db_name")))
			{
				String order_ID = request.getParameter("order_ID");
				String accomplish_time = request.getParameter("accomplish_time");
				String accomplish_register = request.getParameter("accomplish_register");
				String accomplish_register_ID = request.getParameter("accomplish_register_ID");
				try
				{
					String sql = (new StringBuilder("update crm_order set accomplish_tag='1',accomplish_time='")).append(accomplish_time).append("',accomplish_register='").append(accomplish_register).append("',accomplish_register_ID='").append(accomplish_register_ID).append("' where order_ID='").append(order_ID).append("'").toString();
					crm_db.executeUpdate(sql);
				}
				catch (Exception ex)
				{
					out.println((new StringBuilder("error")).append(ex).toString());
				}
				response.sendRedirect("crm/accomplish/register_list.jsp");
				crm_db.commit();
				crm_db.close();
			} else
			{
				response.sendRedirect("error_conn.htm");
			}
		}
		catch (Exception exception) { }
	}
}
